<%@ page language="java" import="java.util.*" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
<% request.setCharacterEncoding("utf-8"); %>
<%@ taglib prefix="c" uri="/WEB-INF/c.tld" %>
<%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>Shop 管理中心 - 修改资料</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<c:url value="/Admin/styles/general.css" />" rel="stylesheet" type="text/css" />
	<link href="<c:url value="/Admin/styles/main.css" />" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<c:url value="/js/user.js" />"></script>
	<c:choose>
		<c:when test="${not empty param.suser}">
			<c:if test="${userBean==null}">
				<script language="javascript">
		            location.href="<c:url value='/servlet/UserManageServlet?suser=" + "${param.suser}" + "&fromPage=/Admin/Admin_Einfo.jsp&act=adminedit' />";
		        </script>
		    </c:if>
		</c:when>
		<c:when test="${not empty param.msg}">
			<script type="text/javascript" language="javascript">
				alert("${param.msg}");
				location.href="<c:url value='/Admin/Admin_Info.jsp?suser=${param.username}' />";
			</script>
		</c:when>
		<c:otherwise>
			<script language="javascript">
				location.href="<c:url value='/Admin/Admin_List.jsp' />";
			</script>
		</c:otherwise>
	</c:choose>
  </head>
  
  <body> 
    <h1>
		<span class="action-span"><a href="<c:url value="/Admin/Admin_Info.jsp?suser=${param.suser}" />">资料显示</a></span>
		<span class="action-span"><a href="<c:url value="/Admin/Admin_Einfo.jsp?suser=${param.suser}" />">资料修改</a>&nbsp;&nbsp;</span>
		<span class="action-span"><a href="<c:url value="/Admin/Admin_Epwd.jsp?suser=${param.suser}" />">密码修改</a>&nbsp;&nbsp;</span>
		<span class="action-span"><a href="<c:url value="/Admin/Admin_List.jsp" />">管理员列表</a>&nbsp;&nbsp;</span>
		<span><a href="<c:url value="/Admin/Admin_Main.jsp" />">Shop 管理中心</a>  - 管理员资料修改 </span>
	</h1>
	<div class="main-div1">
		<table width="100%" class="btable">
		    <tr>
		        <td><form name="formEdit" action="<c:url value="/servlet/UserManageServlet" />" method="post" onsubmit="return checkUpdateInfoForm();">
		            <table cellspacing="0" class="tableList">
		              <tr>
		                <th width="100">用&nbsp;&nbsp;户&nbsp;&nbsp;名:</th>
		                <td> ${userBean.suser}</td>
		              </tr>
		              <tr>
		                <th>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</th>
		                <td>
		                <c:choose>
		                	<c:when test="${userBean.ssex=='男'}">
		                	<input type="radio" name="ssex" value="男" checked="checked" />男&nbsp;<input type="radio" name="ssex" value="女" />女
		                	</c:when>
		                	<c:otherwise>
		                	<input type="radio" name="ssex" value="男" />男&nbsp;<input type="radio" name="ssex" value="女" checked="checked" />女
		                	</c:otherwise>
		                </c:choose>
		                </td>
		              </tr>
		              <tr>
		                <th>真实姓名:</th>
		                <td>
		                  <input name="sname" type="text" maxlength="30" value="${userBean.sname}" /></td>
		              </tr>
		              <tr>
		                <th width="100">出生日期:</th>
		                <td> <input name="dbirth" type="text" maxlength="30" value="${userBean.dbirth}" /></td>
		              </tr>
		              <tr>
		                <th>电子邮箱:</th>
		                <td><input name="semail" type="text" value="${userBean.semail}" /></td>
		              </tr>
		              <tr>
		                <th>电话号码:</th>
		                <td><input name="sphone" type="text" value="${userBean.sphone}" /></td>
		              </tr>
		              <tr>
		                <th>地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址:</th>
		                <td><input name="saddress" type="text" value="${userBean.saddress}"/></td>
		              </tr>
		              <tr>
		                <th>邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编:</th>
		                <td><input name="scode" type="text" value="${userBean.scode}" /></td>
		              </tr>
		              <tr>
		                <th>&nbsp;</th>
		                <td>
		                  <input type="hidden" name="fromPage" value="/Admin/Admin_Einfo.jsp" />
		                  <input type="hidden" name="act" value="adminedit" />
		                  <input type="hidden" name="first" value="update" />
		                  <input type="hidden" name="suser" value="${userBean.suser}" />
		                  <input name="submit" type="submit" value="确定修改" />
		                </td>
		              </tr>
		            </table>
		          </form></td>
		    </tr>
		</table>
	</div>
	<div id="footer">版权所有 &copy;</div>
	<script language="javascript">
        var email_empty = "Email地址不能为空";
        var email_format = "Email 地址无效";
		var phone_empty = "电话号码不能为空";
		var phone_format = "电话号码格式错误";
		var code_empty = "邮编不能为空";
		var code_format = "邮编只能是6位数字";
  	</script>
  </body>
</html>
